home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIPluginInstancePeer.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  222 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPluginInstancePeer.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPluginInstancePeer_h__
  6. #define __gen_nsIPluginInstancePeer_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nspluginroot_h__
  14. #include "nspluginroot.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. #include "nsplugindefs.h"
  22. struct JSObject;
  23. class nsIOutputStream; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsIPluginInstancePeer */
  27. #define NS_IPLUGININSTANCEPEER_IID_STR "4b7cea20-019b-11d2-815b-006008119d7a"
  28.  
  29. #define NS_IPLUGININSTANCEPEER_IID \
  30.   {0x4b7cea20, 0x019b, 0x11d2, \
  31.     { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
  32.  
  33. /**
  34.  * The nsIPluginInstancePeer interface is the set of operations implemented
  35.  * by the browser to support a plugin instance. When a plugin instance is 
  36.  * constructed, a nsIPluginInstancePeer is passed to its initializer 
  37.  * representing the instantiation of the plugin on the page. 
  38.  *
  39.  * Other interfaces may be obtained from nsIPluginInstancePeer by calling
  40.  * QueryInterface, e.g. nsIPluginTagInfo.
  41.  */
  42. class NS_NO_VTABLE nsIPluginInstancePeer : public nsISupports {
  43.  public: 
  44.  
  45.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGININSTANCEPEER_IID)
  46.  
  47.   /**
  48.    * Returns the value of a variable associated with the plugin manager.
  49.    *
  50.    * (Corresponds to NPN_GetValue.)
  51.    *
  52.    * @param aVariable - the plugin manager variable to get
  53.    * @param aValue    - the address of where to store the resulting value
  54.    * @result          - NS_OK if this operation was successful
  55.    */
  56.   /* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */
  57.   NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) = 0;
  58.  
  59.   /**
  60.      * Returns the MIME type of the plugin instance. 
  61.      *
  62.      * (Corresponds to NPP_New's MIMEType argument.)
  63.      *
  64.    * @param aMIMEType - resulting MIME type
  65.    * @result          - NS_OK if this operation was successful
  66.      */
  67.   /* readonly attribute nsMIMEType MIMEType; */
  68.   NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) = 0;
  69.  
  70.   /**
  71.      * Returns the mode of the plugin instance, i.e. whether the plugin is
  72.      * embedded in the html, or full page. 
  73.      *
  74.      * (Corresponds to NPP_New's mode argument.)
  75.      *
  76.    * @param result - the resulting mode
  77.    * @result       - NS_OK if this operation was successful
  78.      */
  79.   /* readonly attribute nsPluginMode mode; */
  80.   NS_IMETHOD GetMode(nsPluginMode *aMode) = 0;
  81.  
  82.   /**
  83.      * This operation is called by the plugin instance when it wishes to send
  84.      * a stream of data to the browser. It constructs a new output stream to which
  85.      * the plugin may send the data. When complete, the Close and Release methods
  86.      * should be called on the output stream.
  87.      *
  88.      * (Corresponds to NPN_NewStream.)
  89.      *
  90.    * @param aType   - MIME type of the stream to create
  91.    * @param aTarget - the target window name to receive the data
  92.    * @param aResult - the resulting output stream
  93.    * @result        - NS_OK if this operation was successful
  94.      */
  95.   /* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */
  96.   NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) = 0;
  97.  
  98.   /**
  99.      * This operation causes status information to be displayed on the window
  100.      * associated with the plugin instance. 
  101.      *
  102.      * (Corresponds to NPN_Status.)
  103.      *
  104.    * @param aMessage - the status message to display
  105.    * @result         - NS_OK if this operation was successful
  106.      */
  107.   /* void showStatus (in string aMessage); */
  108.   NS_IMETHOD ShowStatus(const char *aMessage) = 0;
  109.  
  110.   /**
  111.      * Set the desired size of the window in which the plugin instance lives.
  112.      *
  113.    * @param aWidth  - new window width
  114.    * @param aHeight - new window height
  115.    * @result        - NS_OK if this operation was successful
  116.      */
  117.   /* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */
  118.   NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) = 0;
  119.  
  120. };
  121.  
  122. /* Use this macro when declaring classes that implement this interface. */
  123. #define NS_DECL_NSIPLUGININSTANCEPEER \
  124.   NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue); \
  125.   NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType); \
  126.   NS_IMETHOD GetMode(nsPluginMode *aMode); \
  127.   NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult); \
  128.   NS_IMETHOD ShowStatus(const char *aMessage); \
  129.   NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight); 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  132. #define NS_FORWARD_NSIPLUGININSTANCEPEER(_to) \
  133.   NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) { return _to GetValue(aVariable, aValue); } \
  134.   NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) { return _to GetMIMEType(aMIMEType); } \
  135.   NS_IMETHOD GetMode(nsPluginMode *aMode) { return _to GetMode(aMode); } \
  136.   NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) { return _to NewStream(aType, aTarget, aResult); } \
  137.   NS_IMETHOD ShowStatus(const char *aMessage) { return _to ShowStatus(aMessage); } \
  138.   NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) { return _to SetWindowSize(aWidth, aHeight); } 
  139.  
  140. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  141. #define NS_FORWARD_SAFE_NSIPLUGININSTANCEPEER(_to) \
  142.   NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aVariable, aValue); } \
  143.   NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(aMIMEType); } \
  144.   NS_IMETHOD GetMode(nsPluginMode *aMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMode(aMode); } \
  145.   NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewStream(aType, aTarget, aResult); } \
  146.   NS_IMETHOD ShowStatus(const char *aMessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowStatus(aMessage); } \
  147.   NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowSize(aWidth, aHeight); } 
  148.  
  149. #if 0
  150. /* Use the code below as a template for the implementation class for this interface. */
  151.  
  152. /* Header file */
  153. class nsPluginInstancePeer : public nsIPluginInstancePeer
  154. {
  155. public:
  156.   NS_DECL_ISUPPORTS
  157.   NS_DECL_NSIPLUGININSTANCEPEER
  158.  
  159.   nsPluginInstancePeer();
  160.  
  161. private:
  162.   ~nsPluginInstancePeer();
  163.  
  164. protected:
  165.   /* additional members */
  166. };
  167.  
  168. /* Implementation file */
  169. NS_IMPL_ISUPPORTS1(nsPluginInstancePeer, nsIPluginInstancePeer)
  170.  
  171. nsPluginInstancePeer::nsPluginInstancePeer()
  172. {
  173.   /* member initializers and constructor code */
  174. }
  175.  
  176. nsPluginInstancePeer::~nsPluginInstancePeer()
  177. {
  178.   /* destructor code */
  179. }
  180.  
  181. /* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */
  182. NS_IMETHODIMP nsPluginInstancePeer::GetValue(nsPluginInstancePeerVariable aVariable, void * aValue)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* readonly attribute nsMIMEType MIMEType; */
  188. NS_IMETHODIMP nsPluginInstancePeer::GetMIMEType(nsMIMEType *aMIMEType)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* readonly attribute nsPluginMode mode; */
  194. NS_IMETHODIMP nsPluginInstancePeer::GetMode(nsPluginMode *aMode)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */
  200. NS_IMETHODIMP nsPluginInstancePeer::NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult)
  201. {
  202.     return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204.  
  205. /* void showStatus (in string aMessage); */
  206. NS_IMETHODIMP nsPluginInstancePeer::ShowStatus(const char *aMessage)
  207. {
  208.     return NS_ERROR_NOT_IMPLEMENTED;
  209. }
  210.  
  211. /* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */
  212. NS_IMETHODIMP nsPluginInstancePeer::SetWindowSize(PRUint32 aWidth, PRUint32 aHeight)
  213. {
  214.     return NS_ERROR_NOT_IMPLEMENTED;
  215. }
  216.  
  217. /* End of implementation class template. */
  218. #endif
  219.  
  220.  
  221. #endif /* __gen_nsIPluginInstancePeer_h__ */
  222.